import request from '@/utils/request'


export default {
    
    login(username,password){
        return request({
            url:'/sysuser/login',
            method:'post',
            data:{
                username,
                password
            }
        })
    },


    //查询
    searchAll(page,pageSize,searchMap){
        return request({
            url:`/stu?method=querySome&pageNumber=${page}&pageSize=${pageSize}${searchMap.name?'&name='+searchMap.name:''}${searchMap.schid?'&schid='+searchMap.schid:''}`,
            method:'get',

        })
    },
   

    //修改
    edit(editForm){
        return request({
            url:'/movie/update',
            method:'put',
            data:editForm,
        })
    },

    searchCity(pid){
        return request({
            url:`/district/select?pid=${pid}`,
            method:'get',
        })
    },


    //   查询所有学校
    searchAllSchool(){
        return  request({
            url: `/stu?method=queryAllSchs`,
            method: "get"
        })
    },

    //ADD
    add(pojo){
        return request({
            url:`/stu?method=add&name=${pojo.name}&age=${pojo.age}&schid=${pojo.schid}&picid=${pojo.picid}&birth=${pojo.birth}`,
            method:'get',
        })
    },

    /* 查看详情 dao  */
    seeDetails(id){
        return request({
            url: `/stu?method=queryCourseAndScoreByStuId&id=${id}`,
            method:"get"
        })
    },

    /* softDelete 软删除 */
    softDelete(delList){
        return request({
            url: `/stu?method=softDeleteStudent&delList=${delList}`,
            type: "get"
        })
    }
}




